﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src="~/plugins/mzui/js/mzui.min.js"></script>
    <link href="~/plugins/mzui/css/mzui.min.css" rel="stylesheet" />
    <title>@(Request.QueryString["lx"] == "1" ? "会员登录" : "商家登录")</title>
</head>
<body>
    <div class="page fade scale-from-center display in" style="overflow: hidden; z-index: 1207;" data-display-name="display1206">
        <div class="dock blur-lg" style="background: url('/images/logo.png') no-repeat center; background-size: cover; top: -2rem; right: -2rem; bottom: -2rem; left: -2rem"></div>
        <div class="dock flex flex-center">
            <div class="modal rounded">
                <div class="heading divider primary-pale">
                    <div class="title">@(Request.QueryString["lx"] == "1" ? "会员登录" : "商家登录")</div>
                    <nav class="nav" style="display:none;">
                        <a href="/home/zhuce?lx=@Request.QueryString["lx"]" class="text-link">没有账号？立即注册</a>
                    </nav>
                </div>
                @using (Html.BeginForm("denglu", "home", new { lx = Request.QueryString["lx"] }, FormMethod.Post, new { @class = "content box", enctype = "multipart/form-data" }))
                {
                    <div class="control has-label-left">
                        <input type="text" name="account" class="input" placeholder="帐号">
                        <label for="account"><i class="icon-user"></i></label>
                        <div class="help-text text-red"></div>
                    </div>
                    <div class="control has-label-left">
                        <input name="pwd" type="password" class="input" placeholder="密码">
                        <label for="account"><i class="icon-key"></i></label>
                        <div class="help-text text-red"></div>
                    </div>
                    <div class="control">
                        <button type="button" id="ok" class="btn block primary" onclick="return ck();">登录</button>
                    </div>
                }
            </div>
        </div>
        <a onclick="history.go(-1);" class="btn dock dock-bottom dock-right spin"><i class="icon-2x icon-times muted"></i></a>
    </div>
    <script>
        function ck() {
            if (document.getElementsByName("pwd")[0].value.length < 5) {
                document.getElementsByClassName("help-text")[1].innerHTML = "密码最少需要6位";
                return false;
            }
            else {
                document.getElementsByClassName("help-text")[1].innerHTML = "";
            }
            document.getElementById('ok').innerText = "正在登录...";
            document.getElementById('ok').disabled = true;
            document.forms[0].submit();
            return true;
        }
    </script>
</body>
</html>
